package cn.net.cfss.fgbp.spi.manage.inte;

import cn.net.cfss.fgbp.spi.manage.constant.Constants;
import cn.net.cfss.fgbp.spi.manage.dto.FscTenantDto;
import cn.net.cfss.fgbp.spi.manage.dto.FscTenantUserDto;
import cn.net.cfss.fgbp.spi.manage.vo.FscTenantUserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

/**
 * @author wutao
 * @version 1.0
 * @date 2020/9/11 14:57
 */
@FeignClient(name = Constants.SPI_SERVER_NAME)
@RequestMapping("IFscTenantUserService")
public interface IFscTenantUserService {


    /**
     * 新增或许修改接口
     * @param fscTenantUserDto
     */
    @RequestMapping(value = "/addOrUpdate",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public void addOrUpdate(@RequestBody FscTenantUserDto fscTenantUserDto);

    @RequestMapping(value = "/queryTenantIdByUserid",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public Long queryTenantIdByUserid(@RequestBody Long userid);

    @RequestMapping(value = "/queryNameByUserIds",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public Map<Long, String> queryNameByUserIds(@RequestBody List<Long> ids);

    @RequestMapping(value = "/queryTenantByUserIds",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public Map<Long, FscTenantDto> queryTenantByUserIds(@RequestBody List<Long> ids);

    @RequestMapping(value = "/queryByUserid",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public FscTenantUserVo queryByUserid(@RequestBody Long userId);

    @RequestMapping(value = "/deleteByUserId",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    public void deleteByUserId(@RequestBody Long userId);

}
